package com.share.test.example.selenium;

import com.alibaba.fastjson.JSON;
import com.share.common.utils.DateUtil;
import com.share.config.email.EMessage;
import org.junit.Test;

import java.util.Date;
import java.util.List;

public class Email extends _TestBase {

    @Test
    public void main1() {
        Date date = DateUtil.strToDate("2023-10-11 18:01:22", DateUtil.YYYY_MM_DD_HH_MM_SS);
        System.out.println("date=" + date);
        List<EMessage> eMessageList = emailUtil.listEmail("亚马逊", "", "", date, null);
        System.out.println(JSON.toJSONString(eMessageList));
    }

    @Test
    public void amabug() {
//        Date date = DateUtil.addDate(new Date(), -2);
        Date date = DateUtil.strToDate("2023-10-11 18:01:22", DateUtil.YYYY_MM_DD_HH_MM_SS);
        System.out.println("date=" + date);
        String s = amazonBuyLogin.amazonBuyLoginCode(date, 3);
        System.out.println(s);
    }
}
